﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Oprah
{
    /// <summary>
    /// Interaction logic for GamePage.xaml
    /// </summary>
    public partial class GamePage : Window
    {
        public bool unlocked; 
        public GamePage(bool lvl)
        {
            unlocked = lvl;
            InitializeComponent();
            
            SplashScreen s = new SplashScreen("/Loading.png");
        }

        public GamePage()
        {
            InitializeComponent();
        }

        private void btnPlay_Click(object sender, RoutedEventArgs e)
        {
            var s = new FSF();
            this.Hide();
            s.Show();
        }

        private void btnReport_Click(object sender, RoutedEventArgs e)
        {
            var d = new Sky("hi");
            this.Hide();
            d.Show();
        }

        private void btnHowPlay_Click(object sender, RoutedEventArgs e)
        {
            var d = new LRPP();
            this.Hide();
            d.Show();
        }

        private void btnGame_Click(object sender, RoutedEventArgs e)
        {
            var d = new MainGame();
            this.Hide();
            d.Show();
        }

        private void btnlucid_Click(object sender, RoutedEventArgs e)
        {
            var d = new memory();
            this.Hide();
            d.Show();
        }

        private void BtnPreGame_Click(object sender, RoutedEventArgs e)
        {
            if (txtUsername.Text != "")
            {

            }
            else
            {
                //when cchecking for levels 
                var d = new Levels(unlocked);
                //var d = new Levels();
                this.Hide();
                d.Show();
            }
            
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            foreach (Account user in Account.users)
            {
                listBox1.Items.Add(user.username);
            }
        }

        private void Reportbtn_Click(object sender, RoutedEventArgs e)
        {
            var d = new Report();
            //this.Hide();
            d.Show();
        }
    }
}
